pt-get update -y
apt-get install openssl -y
apt-get install libssl-dev -y
apt-get install devscripts build-essential fakeroot -y
apt-get install libcppunit-dev -y
apt-get install libsasl2-dev -y
apt-get install cdbs -y
apt-get install ccze -y
apt-get install libfile-readbackwards-perl -y
apt-get install libcap2 -y
apt-get install libcap-dev -y
apt-get install libcap2-dev -y
apt-get install acpid -y
apt-get install sysv-rc-conf -y
apt-get install apache2 -y
wget http://squid-cache.org/Versions/v3/3.4/squid-3.4.9.tar.gz
tar xzvf squid-3*
cd squid-3*
./configure --prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib/squid \
--sysconfdir=/etc/squid \
--localstatedir=/var \
--libdir=/usr/lib \
--includedir=/usr/include \
--datadir=/usr/share/squid \
--enable-err-languages=English \
--enable-default-err-language=English \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--disable-dependency-tracking \
--enable-storeio=ufs,aufs,diskd \
--enable-removal-policies=lru,heap \
--enable-icap-client \
--disable-wccp \
--disable-wccpv2 \
--enable-follow-x-forwarded-for \
--enable-x-accelerator-vary \
--enable-zph-qos \
--enable-snmp \
--with-default-user=proxy \
--with-logdir=/var/log/squid \
--with-pidfile=/var/run/squid.pid \
--with-large-files  \
--enable-underscores \
--disable-auth \
--enable-async-io \
--with-pthreads \
--disable-ipv6 \
--enable-ssl \
--enable-ssl-crtd
make
make install
cd
mkdir /cache
chown -R proxy:proxy /cache
chown -R proxy:proxy /var/log/squid
mkdir -p /var/squid/ssl_db
/usr/lib/squid/ssl_crtd -c -s /var/squid/ssl_db/certs
chown -R proxy:proxy /var/squid/ssl_db/certs
mkdir -p /etc/squid/ssl_cert
cd /etc/squid/ssl_cert
openssl req -new -newkey rsa:2048 -days 1500 -nodes -x509 -keyout myCA.pem  -out myCA.pem
openssl x509 -in myCA.pem -outform DER -out myCA.der
chown -R nobody /etc/squid/ssl_db
chown -R proxy:proxy /etc/squid/ssl_db/
touch /var/log/squid/cache.log
touch /var/log/squid/access.log
chown -R proxy:proxy /var/log/squid/
chown -R proxy:proxy /var/log/squid/cache.log
chown -R proxy:proxy /var/log/squid/access.log
cd
touch log
chmod 777 log
echo "tail -f /var/log/squid/access.log|ccze" >> log
cd
chmod 777 /cache
mv /etc/squid/squid.conf /etc/squid/squid.conf.asli
cd /etc/squid/
wget https://as-bak.googlecode.com/svn/squid.conf
cd /etc/init.d/
wget https://as-bak.googlecode.com/svn/squid
chmod 777 /etc/squid/squid.conf
chmod 777 /etc/init.d/squid
cd
squid -z
/usr/sbin/squid start
squid -NdCI
echo -e "Install dan Setting Squid 3.4.9 Http & Https by: djflexter telah selesai... Agar dapat berjalan, \nsebaiknya restart server anda."
while true; do
    read -p "Apakah anda ingin merestart komputer anda sekarang?" yn
    case $yn in
        [Yy]* ) init 6; break;;
        [Nn]* ) exit;;
        * ) echo "Tolong jawab yes atau no";;
    esac
done
rm -rf nonknet.sh.*